
/** $Id: AquiferServerRunner.java 24 2009-05-11 13:27:21Z salbanese0080@gmail.com $ */

package org.aquiferserver.server;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author Seth Albanese
 * 
 */
public class AquiferServerRunner {

	public static final Log logger = LogFactory.getLog( org.aquiferserver.server.AquiferServerRunner.class );
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( new String[] { "aquifer-application-context.xml" } );
		
		AquiferServer server = ( AquiferServer ) context.getBean( "AquiferServer" );
		
		Runtime.getRuntime().addShutdownHook( new Thread() {
			public void run() { 
				logger.info( "Server shutting down..." );
			}
		});	 
		
		server.start( 23230 );
		
	}

}
